package com.xci.sys.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import com.xci.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 系统部件
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(description = "系统部件")
public class SysWidget extends BaseEntity {
    /**
     * 部件名称
     */
    @NotBlank(message = "部件名称不能为空")
    @Length(max = 100, message = "部件名称不能超过{max}个字符")
    @Excel(name = "部件名称", width = 30d)
    @ApiModelProperty(value = "部件名称", required = true, position = 2)
    private String name;

    /**
     * 部件编码
     */
    @NotBlank(message = "部件编码不能为空")
    @Length(max = 100, message = "部件编码不能超过{max}个字符")
    @Excel(name = "部件编码", width = 30d)
    @ApiModelProperty(value = "部件编码", required = true, position = 3)
    private String code;
}